<template>
  <div class="center">
    <!-- 立即登录 -->
    <div class="login">
      <span class="iconfont icon-yonghuhuaxiang"></span>
      <span @click="gologin" v-if="username === ''">立即登录</span>
      <span v-else class="thename">{{ username }}</span>
    </div>
    <!-- 电影订单、商品订单 -->
    <div class="list">
      <div class="move">
        <span class="iconfont icon-dingdan"></span>
        <span>电影订单</span>
      </div>
      <div class="shop">
        <span class="iconfont icon-shujuguanli"></span>
        <span>商品订单</span>
      </div>
    </div>
    <!-- 其他选项 -->
    <div class="other">
      <ul>
        <li>
          <span class="iconfont icon-wenjianjia"></span>
          <span>卖座卷</span>
          <span class="iconfont icon-arrow-right"></span>
        </li>
        <li>
          <span class="iconfont icon-hongbao"></span>
          <span>组合红包</span>
          <span class="iconfont icon-arrow-right"></span>
        </li>
        <li>
          <span class="iconfont icon-yue"></span>
          <span>余额</span>
          <span class="iconfont icon-arrow-right"></span>
        </li>
        <li>
          <span class="iconfont icon-fuwuzhongxin"></span>
          <span>帮助与客服</span>
          <span class="iconfont icon-arrow-right"></span>
        </li>
        <li>
          <span class="iconfont icon-guanli"></span>
          <span>设置</span>
          <span class="iconfont icon-arrow-right"></span>
        </li>
      </ul>
    </div>
    <!-- 电话 -->
    <div class="tel">
      &copy;猫眼电影 v4.3.10 客服电话：<span>1010-5335</span>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      //用户名
      username: ''
    }
  },
  methods: {
    //跳转到登录页面
    gologin() {
      this.$router.push('/login')
    }
  }
};
</script>

<style lang="scss" scoped>
.center {
  margin-top: 2.5rem;
  // 登录
  .login {
    height: 2.5rem;
    background-color: red;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 14;
    display: flex;
    color: #fff;
    span:nth-child(2) {
      margin-top: 1.1rem;
      font-size: .35rem;
    }
    span:last-child {
      margin-top: 1.1rem;
      font-size: .35rem;
    }
  }
  //电影订单、商品订单
  .list {
    width: 100%;
    background-color: #fff;
    display: flex;
    justify-content: space-around;
    border-bottom: .3rem solid rgb(240, 238, 238);
    div {
      display: flex;
      flex-direction: column;
      padding: .38rem 0;
      font-size: .3rem;
      text-align: center;
    }
  }
  //其他选项
  .other {
    width: 100%;
    ul {
      li {
        display: flex;
        padding: .25rem;
        font-size: .34rem;
        border-bottom: 1px solid rgb(233, 230, 230);
        span:first-child{
          width: 10%;
          font-size: .4rem;
        }
        span:nth-child(2) {
          width: 80%;
        }
        span:last-child {
          width: 10%;
          font-size: .3rem;
          color: gray;
          text-align: right;
        }
      }
    }
  }
  //电话
  .tel {
    position: fixed;
    left: 0;
    width: 100%;
    bottom: 1.35rem;
    font-size: .25rem;
    text-align: center;
    color: rgb(151, 150, 150);
    span {
      color: orange;
    }
  }
}

.icon-yonghuhuaxiang {
  font-size: 1.2rem;
  margin: .8rem .5rem 0 .4rem;

}
.icon-shujuguanli {
  font-size: .5rem;
  margin-bottom: .1rem;
  color: green;
}
.icon-dingdan {
  font-size: .58rem;
  color: rgb(7, 167, 7);
}
.icon-wenjianjia {
  color: rgb(209, 233, 104);
}
.icon-hongbao {
  color: rgb(235, 97, 120);
}
.icon-yue {
  color: orange;
  font-size: .5rem  !important;
}
.icon-fuwuzhongxin {
  color: rgb(123, 161, 192);
}
.icon-guanli {
  color: rgb(129, 143, 109);
}
</style>